package com.mapapp.flutter_mapapp.http;


import com.blankj.utilcode.util.Utils;
import com.mapapp.flutter_mapapp.application.Constants;
import com.mapapp.flutter_mapapp.util.SharePreferenceUtil;

public class Url {
    /**
     * 请求地址s
     */
//    public static String BASE_URL = "http://118.24.85.246:9527";
    public static String BASE_URL = "http://182.92.172.217:9527";
    public static String BASE_REPORT_URL = "http://182.92.172.217:9528";
    public String ftpServer = (String) SharePreferenceUtil.get(Utils.getApp(), Constants.FTP_SERVER, "");
    public String ftpUsername = (String) SharePreferenceUtil.get(Utils.getApp(), Constants.FTP_USERNAME, "");
    public String ftpPassword = (String) SharePreferenceUtil.get(Utils.getApp(), Constants.FTP_PASSWORD, "");
    public int ftpPort;

    private volatile static Url url;

    private Url() {
        String s = (String) SharePreferenceUtil.get(Utils.getApp(), Constants.FTP_PORT, "21");
        try {
            ftpPort = Integer.parseInt(s);
        } catch (Exception e) {
            ftpPort = 21;
        }
    }

    public static Url getInstance() {
        if (url == null) {
            synchronized (Url.class) {
                if (url == null) {
                    url = new Url();
                }
            }
        }
        return url;
    }

}
